import { defineStore } from "pinia";
import HYRequest from '../../services/request/index'
import { getOrderList } from "@/services/modules/order";
const useorderstore=defineStore("order",{
    state:()=>({
        orderlist:[],
    })
    ,
    actions:{
        async fetchOrderList(type = "all"){
            // console.log(1);
            
            const res=await getOrderList(type)
            this.orderlist=res.data.data.orders;
            // console.log(this.orderlist);
        }
    }
})

export default useorderstore